package com.ruoyi.saleReturn.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.procurement.domain.ProcurementModel;
import com.ruoyi.sale.domain.SaleGoodsModel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 采购退货从表
 *
 * @author WangChangShuo
 * @date 2022年06月17日 14:12
 */
public class SaleReturnModel extends BaseEntity {

    private String productName;
    /**
     * 销售退货从表自增主键
     */
    private Long saleReturnModelId;
    /**
     * 采购退货主表主键
     */
    private Long saleReturnId;
    /**
     * 选择销货单从表主键 确认退哪个货物
     */
    private Long saleGoodsModelId;
    /**
     * 选择退货单 的modelid
     */
    private Long purchaseReturnModelId;
    /**
     * 采购入库订单编号
     */
    private Long procurementWarehousingName;
    /**
     * 退货数量
     */
    private int returnNum;
    private int outNum;
    private int allNum;
    private String unit;
    /**
     * 单价
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal price;
    /**
     * 税率(1 3 5 13)
     */
    private String taxRate;
/*
    销货单入库的总数量(单位是支)
     */
    /**
     * 含税单价
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal taxPrice;
    /**
     * 总金额
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal total;
    /**
     * 含税金额
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private BigDecimal taxTotal;
    /**
     * 采购入库从表实体类
     */
    private ProcurementModel procurementModel;
    private SaleGoodsModel saleGoodsModel;

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public int getOutNum() {
        return outNum;
    }

    public void setOutNum(int outNum) {
        this.outNum = outNum;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public int getAllNum() {
        return allNum;
    }

    public void setAllNum(int allNum) {
        this.allNum = allNum;
    }

    public ProcurementModel getProcurementModel() {
        return procurementModel;
    }

    public void setProcurementModel(ProcurementModel procurementModel) {
        this.procurementModel = procurementModel;
    }

    public SaleGoodsModel getSaleGoodsModel() {
        return saleGoodsModel;
    }

    public void setSaleGoodsModel(SaleGoodsModel saleGoodsModel) {
        this.saleGoodsModel = saleGoodsModel;
    }

    public Long getProcurementWarehousingName() {
        return procurementWarehousingName;
    }

    public void setProcurementWarehousingName(Long procurementWarehousingName) {
        this.procurementWarehousingName = procurementWarehousingName;
    }

    public Long getSaleReturnModelId() {
        return saleReturnModelId;
    }

    public void setSaleReturnModelId(Long saleReturnModelId) {
        this.saleReturnModelId = saleReturnModelId;
    }

    public Long getSaleReturnId() {
        return saleReturnId;
    }

    public void setSaleReturnId(Long saleReturnId) {
        this.saleReturnId = saleReturnId;
    }

    public Long getSaleGoodsModelId() {
        return saleGoodsModelId;
    }

    public void setSaleGoodsModelId(Long saleGoodsModelId) {
        this.saleGoodsModelId = saleGoodsModelId;
    }

    public Long getPurchaseReturnModelId() {
        return purchaseReturnModelId;
    }

    public void setPurchaseReturnModelId(Long purchaseReturnModelId) {
        this.purchaseReturnModelId = purchaseReturnModelId;
    }

    public int getReturnNum() {
        return returnNum;
    }

    public void setReturnNum(int returnNum) {
        this.returnNum = returnNum;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(String taxRate) {
        this.taxRate = taxRate;
    }

    public BigDecimal getTaxPrice() {
        return taxPrice;
    }

    public void setTaxPrice(BigDecimal taxPrice) {
        this.taxPrice = taxPrice;
    }

    public BigDecimal getTotal() {
        return total;
    }

    public void setTotal(BigDecimal total) {
        this.total = total;
    }

    public BigDecimal getTaxTotal() {
        return taxTotal;
    }

    public void setTaxTotal(BigDecimal taxTotal) {
        this.taxTotal = taxTotal;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("saleReturnModelId", getSaleReturnModelId())
                .append("saleReturnId", getSaleReturnId())
                .append("saleGoodsModelId", getSaleGoodsModelId())
                .append("purchaseReturnModelId", getPurchaseReturnModelId())
                .append("returnNum", getReturnNum())
                .append("price", getPrice())
                .append("taxRate", getTaxRate())
                .append("taxPrice", getTaxPrice())
                .append("total", getTotal())
                .append("taxTotal", getTaxTotal())
                .toString();
    }
}
